package ly.jobdu;

import java.math.BigDecimal;
import java.util.Scanner;
public class Q1067Factorial {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = 1;
        while(scanner.hasNext()) {
            a = scanner.nextInt();
            System.out.println(getAnswer(a));
        }
         
    }
     
    public static String getAnswer(int a) {
        BigDecimal answer = new BigDecimal("1");
        for(int i = 1; i <= a; i++) {
            answer = answer.multiply(new BigDecimal(i));
        }
        return answer.toString();
    }
}